owned_ttf_parser 0.6.0

ttf-parser plus support for owned data
Documentation

owned_ttf_parser crates.io Documentation

ttf-parser plus support for owned data.

Provides OwnedFont, AsFontRef and re-exports ttf_parser::*.

Example

use owned_ttf_parser::{AsFontRef, OwnedFont, Font};

let owned_font = OwnedFont::from_vec(owned_font_data, 0).unwrap();
let font_ref: &Font<'_> = owned_font.as_font();

assert_eq!(font_ref.ascender(), 2254);

no_std

no_std environments are supported using alloc.

owned_ttf_parser = { default-features = false }

Minimum supported rust compiler

All crates maintained with latest stable rust.